<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
    <script>
        var num = prompt('打印边长为几的矩形：');
        for(var i=0;i<num;i++){
            for(var j=0;j<num;j++){
                document.write('七');
            }
            document.write('<br>');
        }
    </script>
</body>
</html>